wallthickness = 0.5
baseThickness = 0.6
fudgeFactor = 0.3 --mm
sideLength = 36.36 + 2*wallthickness + fudgeFactor --mm, used for creating backCover
boxheight = 5.00 --mm, front plate is now short.
screwMountHeight = 7.5

sideSlotSide = 4.0
sideSlotHeightPos = screwMountheight - (sideSlotSide/2) - 0.1

screwMountRadius = 2.0
screwSeparation = 28.29 --mm
screwDiameter = 1.87
centerHoleDiameter = 15.33 + 0.5 --mm
keySlotWidth = 4.0 + 0.1 --mm
keySlotHeight = 1.9  + 0.1--mm adding some fudge

baseSub = Cylinder smooth:on heightsegs:1 capsegs:1 sides:25 height:boxheight radius:(sideLength/2) mapcoords:on pos:[0,0,0] isSelected:on
base = Box lengthsegs:1 widthsegs:1 heightsegs:1 length:sideLength width:sideLength height:(boxheight-(baseThickness/2)) mapcoords:on pos:[0,0,(baseThickness/2)] isSelected:on

select base
ProBoolean.CreateBooleanObject base baseSub 0 0 1

keySlot = Box lengthsegs:1 widthsegs:1 heightsegs:1 length:keySlotHeight width:keySlotWidth height:(4*wallthickness) mapcoords:on pos:[0,(centerHoleDiameter/2),-wallthickness] isSelected:on
inside = Box lengthsegs:1 widthsegs:1 heightsegs:1 length:(sideLength - 2*wallthickness) width:(sideLength - 2*wallthickness) height:(boxheight - baseThickness) mapcoords:on pos:[0,0,baseThickness] isSelected:on

/*
sideSlot1 = Box lengthsegs:1 widthsegs:1 heightsegs:1 length:(4*wallthickness) width:sideSlotSide height:(sideSlotSide/2) mapcoords:on pos:[0,(sideLength/2 - wallthickness),sideSlotHeightPos] isSelected:on
sideSlot2 = Box lengthsegs:1 widthsegs:1 heightsegs:1 length:(4*wallthickness) width:sideSlotSide height:(sideSlotSide/2) mapcoords:on pos:[0,-(sideLength/2 + wallthickness),sideSlotHeightPos] isSelected:on
sideSlot3 = Box lengthsegs:1 widthsegs:1 heightsegs:1 length:sideSlotSide width:(4*wallthickness) height:(sideSlotSide/2) mapcoords:on pos:[(sideLength/2 - wallthickness),0,sideSlotHeightPos] isSelected:on
sideSlot4 = Box lengthsegs:1 widthsegs:1 heightsegs:1 length:sideSlotSide width:(4*wallthickness) height:(sideSlotSide/2) mapcoords:on pos:[-(sideLength/2 + wallthickness),0,sideSlotHeightPos] isSelected:on
*/
--just using friction instead of sideSlots

mount1 = Cylinder smooth:on heightsegs:1 capsegs:1 sides:25 height:(screwMountHeight + baseThickness) radius:screwMountRadius mapcoords:on pos:[screwSeparation/2,screwSeparation/2,(baseThickness)] isSelected:on
mount2 = Cylinder smooth:on heightsegs:1 capsegs:1 sides:25 height:(screwMountHeight + baseThickness) radius:screwMountRadius mapcoords:on pos:[screwSeparation/2,-screwSeparation/2,(baseThickness)] isSelected:on
mount3 = Cylinder smooth:on heightsegs:1 capsegs:1 sides:25 height:(screwMountHeight + baseThickness) radius:screwMountRadius mapcoords:on pos:[-screwSeparation/2,screwSeparation/2,(baseThickness)] isSelected:on
mount4 = Cylinder smooth:on heightsegs:1 capsegs:1 sides:25 height:(screwMountHeight + baseThickness) radius:screwMountRadius mapcoords:on pos:[-screwSeparation/2,-screwSeparation/2,(baseThickness)] isSelected:on
	
hole1 = Cylinder smooth:on heightsegs:1 capsegs:1 sides:25 height:(screwMountHeight*2) radius:(screwDiameter/2) mapcoords:on pos:[screwSeparation/2,screwSeparation/2,0] isSelected:on
hole2 = Cylinder smooth:on heightsegs:1 capsegs:1 sides:25 height:(screwMountHeight*2) radius:(screwDiameter/2) mapcoords:on pos:[screwSeparation/2,-screwSeparation/2,0] isSelected:on
hole3 = Cylinder smooth:on heightsegs:1 capsegs:1 sides:25 height:(screwMountHeight*2) radius:(screwDiameter/2) mapcoords:on pos:[-screwSeparation/2,screwSeparation/2,0] isSelected:on
hole4 = Cylinder smooth:on heightsegs:1 capsegs:1 sides:25 height:(screwMountHeight*2) radius:(screwDiameter/2) mapcoords:on pos:[-screwSeparation/2,-screwSeparation/2,0] isSelected:on

centerHole = Cylinder smooth:on heightsegs:1 capsegs:1 sides:25 height:(screwMountHeight) radius:(centerHoleDiameter/2) mapcoords:on pos:[0,0,-(screwMountHeight/2)] isSelected:on

select mount1
ProBoolean.CreateBooleanObject mount1 hole1 2 0 1

select mount2
ProBoolean.CreateBooleanObject mount2 hole2 2 0 1

select mount3
ProBoolean.CreateBooleanObject mount3 hole3 2 0 1

select mount4
ProBoolean.CreateBooleanObject mount4 hole4 2 0 1


/*select base
ProBoolean.CreateBooleanObject base sideSlot1 2 0 1
ProBoolean.CreateBooleanObject base sideSlot2 2 0 1
ProBoolean.CreateBooleanObject base sideSlot3 2 0 1
ProBoolean.CreateBooleanObject base sideSlot4 2 0 1*/



select base
ProBoolean.CreateBooleanObject base inside 2 0 1
ProBoolean.CreateBooleanObject base centerHole 2 0 1
ProBoolean.CreateBooleanObject base keySlot 2 0 1
ProBoolean.CreateBooleanObject base mount1 0 0 1
ProBoolean.CreateBooleanObject base mount2 0 0 1
ProBoolean.CreateBooleanObject base mount3 0 0 1
ProBoolean.CreateBooleanObject base mount4 0 0 1

